<%-- 
    Document   : newjspview
    Created on : Mar 9, 2011, 2:03:27 PM
    Author     : user
--%>

<%@page import="model.User"%>
<%@page import="java.util.List"%>
<%@page import="model.Connect"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<%
System.out.println(request.getAttribute("users"));
List<User> users = (List<User>) request.getAttribute("users");
int pagen = Integer.parseInt(request.getParameter("pagen"));
%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1>Hello World!</h1>

        <table border="1">
            <tr>
                <td>ID</td>
                <td>User</td>
                <td>Pass</td>
            </tr>
            <% for(int i  = 0; i < users.size(); i++) { %>
            <tr>
                <td><%= users.get(i).getId() %></td>
                <td><%= users.get(i).getUser() %></td>
                <td><%= users.get(i).getPass() %></td>
            </tr>
            <% } %>
        </table>

        <% for (int i = 1; i <= pagen;i++){%>
        <a href="Process?pageNumber=<%= i %>"> <%= i %> </a>
        <%}%>
<br/>

    </body>
</html>
